<form action="{:U('Common/addCommon')}" method="post" class="form-horizontal">
    <volist name="list" id="v">
        <if condition="$v['type'] == 1">
            <div class="form-item">
                <label class="item-label">{$v.name}</label>
                <input type="text" class="text input-large" name="{$v.field}" id="{$v.field}" value="{$data[$v['field']]|default=''}" dvalue="{$v.values}">
            </div>
        <else />
            <div class="form-item">
                <label class="item-label">{$v.name}</label>
                <div class="controls">
                    <select name="{$v.field}">
                        <volist name="v.temp" id="vo">
                            <option value="{$vo.name}" <if condition="$vo['name'] eq $data[$v['field']]">selected="selected"</if>>{$vo.name}</option>
                        </volist>
                    </select>    
                </div>
            </div>
        </if>
    </volist> 
    <div class="form-item">
        <input type="hidden" name="table" value="goods_introduce">
        <input type="hidden" name="methods" value="current">
        <input type="hidden" name="gid" value="{$id|default=0}">
        <input type="hidden" name="fields" value="gno,text;brand_name,text;style,text;color,text;sj_time,text;ss_year,text;piancha,text;xd_cz,text;xm_cz,text;bihe,text;jijie,text;sex,text;xm_cl,text;wd_cl,text;gid,text">
        <input type="hidden" name="id" value="{$data.id|default=0}">
        <button class="btn submit-btn ajax-post" id="submit" type="submit" target-form="form-horizontal">确 定</button>
        <button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
    </div>
</form>
<script type="text/javascript">
    $(function(){
        $('#brand_name').val($('#brand_name').attr('dvalue'));
    });
</script>